@extends('common.header')
<link rel="stylesheet" type="text/css" href="{{ asset('/css/login/create.css') }}"/>
<script src=" {{ asset('/js/jquery-1.9.1.min.js') }} "></script>
<script src=" {{ asset('/js/login/create.js') }} "></script>
<script>
		<!-- 2.设置全局ajax选项 -->
		$.ajaxSetup({
			headers: {
				'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
			}
		});
		var _token = $('meta[name="csrf-token"]').attr('content');
</script>
<!--面包屑导航-->
<div style="width: 1200px;height: 40px;line-height:40px;position: relative;margin: 110px auto 0">
    <ol style="float: left;overflow: hidden;color: #333;list-style: none;">
        <li style="float: left;margin-left: 5px">当前位置：</li>
        <li style="float: left;margin-left: 5px"><a href="{{ url('/') }}" style="color: #de1e30;margin-left: 5px">首页> </a>
        </li>
        <li style="float: left;margin-left: 5px">
                登陆</li>
        <li style="float: left;margin-left: 5px">> 完善信息</li>
    </ol>
</div>
<div class="wrap">
	<div class="box">
		<h2>注册</h2>
		<div class="content">
			<div class="top-content">
				<ul class="top-title">
					<li><i class="glyphicon glyphicon-ok tglyphicon-ok"></i><p>第三方验证</p></li>
					<li><i class="glyphicon glyphicon-pencil tglyphicon-pencil"></i><p>完善信息</p></li>
					<li class="succenssli"><i></i><p>注册成功</p></li>
				</ul>
				<div class="bottom-content" >
				
					<ul class="info">
						<li class="nameli">
							<div>
								<label for="username">昵称  :</label>
							</div>
							<div>
								<input id="username" name="name" type="text" placeholder="昵称（5-20个字符，中英文、数字下划线）" /><p><b></b><span>有误</span></p>
							</div>
						</li>
						<li class="passli">
							<div>
								<label for="mobilePwdIpt">密码  :</label>
							</div>
							<div>
								<input id="mobilePwdIpt" name="password" type="password" placeholder="请输入密码,不得低于6位" /><p><b></b><span></span></p>
							</div>
						</li>
						<li class="repassli">
							<div>
								<label for="confirm_password">确认密码  :</label>
							</div>
							<div>
								<input id="confirm_password" name="confirm_password" type="password" placeholder="再次输入登录密码"><p><b></b><span></span></p>
							</div>
						</li>
						<li class="yanzhengli">
							<div>
								<label for="regphone">手机号  :</label>
							</div>
							<div>
								<input  id="regphone" name="phone" type="text" placeholder="请输入手机号"><p id="regWarn"><b></b><span>有误</span></p>
							</div>
							<div id="getPhoneCode" class="btn btn-group-md btn-info"
							 style="position: absolute;left:370px;top: 6px;font-size: 12px;width:100px;height:32px;color:#fff;" >获取验证码
							</div>
						</li>
						<li>
						<div><label>验证码 :</label></div>
                    
					<div class="password-input-wrapper ember-view" style="position: relative">

                       <input class="text w-308" id="code" name="code" type="text" placeholder="请输入短信验证码">

                        
                    </div></li>
					<li>
						<div class="checkbox"><p class="check" data-checked="false"></p> <p class="checklabel">阅读并接受</p><a class="licence" >蜘蛛.tv用户协议</a></div>
					</li>
                        <input type="text" name="access_token" value="{{$access_token}}"/>
                        <input type="text" name="uid" value="{{$open_id}}"/>
					    <li class="createbtn"><button class="btn btn-success" id="goto_createbtn">立即注册</button></li>
					</ul>
				</div>

                <!--提示信息-->
                <div class="bottom-content" id="passError" ></div>

				<!--注册成功页面 开始-->
				<div class="successbox" style="display:none">
					<h2><i class="glyphicon glyphicon-ok"></i><span>恭喜您，注册成功！</span></h2>
					<p><span>5</span>秒后自动跳转到首页...<a href="{{ asset('/') }}">手动跳转</a></p>
				</div>
				<!--注册成功页面 结束-->
			</div>
		</div>
	</div>
</div>
@extends('common.footer')

<script>
    $("#goto_createbtn").click(function(){
        var name = $("input[name='name']").val();
        var pass = $("input[name='password']").val();
        var confirm_password = $("input[name='confirm_password']").val();
        var phone = $("input[name='phone']").val();
        var code = $("input[name='code']").val();
        var url = "{{ url('/do_weibo') }}";
        $.ajax({
            type:"get",
            url:url,
            data:{code:code,phone:phone,name:name,pass:pass,confirm_password:confirm_password,_token:_token},
            async:true,
            dataType:"json",
            success:function(back){
                alert(back)
//                $('#passError').html( '' );
//                $("#passError").slideDown(1500);
//                // 显示错误信息
//                $('#passError').html( back['show_info'] );
            }
        })

    })

</script>